<form id="insert_tmpl" action="index.php?app=site&ctl=admin_theme_tmpl&act=insert_tmpl" method="post">
<input type="hidden" name="theme" value="<{$theme}>">
<div class="tableform">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
  <th><{t}>类型：<{/t}></th>
  <td>
<select name="tmpl_type" vtype='required'>
<{foreach from=$types item=item key=key}>
<option value="<{$key}>" <{if $key == $type}>selected<{/if}>><{$item}></option>
<{/foreach}>
</select></td>
</tr>

<tr>
  <th><{t}>名称：<{/t}></th>
  <td><{input type="text" name="tmpl_name" value="" vtype='required' }></td>
</tr>

<tr>
  <th><{t}>文件名：<{/t}></th>
  <td><{input type="text" name="tmpl_path" value="" }><span class="notice-inline">(<{t}>留白系统自动生成，只允许英语及数字<{/t}>)</span></td>
</tr>

<tr>
  <th><{t}>页面源码：<{/t}></th>
  <td><{input type="textarea" name="content" value=$content vtype='required' cols="70" rows="18" style="font-fmaliy:verdana;color:#336600;" }></td>
</tr>
</table>
</div>

<div class="table-action">
<{button type="submit" label=$___a="添加"|t:'site'}>
</div>

</form>
<script>
$('insert_tmpl').store('target',{
	onSuccess:function(){
		if($('insert_tmpl').getParent('.dialog'))
		$('insert_tmpl').getParent('.dialog').retrieve('instance').close();
		for(var f in finderGroup){
			if(finderGroup[f])
			finderGroup[f].refresh()
		}
		
	}
});
</script>
